<!DOCTYPE html>
<html>
<head>
<meta  lang="en"  charset="UTF-8">
<title>绑定账户审核</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="" name="description">
<meta content="" name="author">
<link href="${request.getContextPath()}/Public/assets/admin/css/css.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/font-awesome/css/font-awesome.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/simple-line-icons/simple-line-icons.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/css/bootstrap.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/uniform/css/uniform.default.css"
	rel="stylesheet" type="text/css">

<link
	href="${request.getContextPath()}/Public/assets/global/css/components-rounded.css"
	id="style_components" rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/css/plugins.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/admin/css/layout.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/admin/css/themes/default.css"
	rel="stylesheet" type="text/css" id="style_color">
<link
	href="${request.getContextPath()}/Public/assets/admin/css/custom.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css"
	rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css"
	href="${request.getContextPath()}/Public/assets/global/plugins/jquery-notific8/jquery.notific8.min.css" />
<link
	href="${request.getContextPath()}/Public/assets/admin/css/common.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/css/kkpager.css"
	rel="stylesheet" type="text/css">
<link rel="shortcut icon"
	href="${request.getContextPath()}/Public/favicon.ico">

<!-- 时间插件 -->
<link
	href="${request.getContextPath()}/Public/js/jqueryUI/css/jquery-ui.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/js/jqueryUI/css/jquery-ui-timepicker-addon.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/js/jqueryUI/css/jquery.datetimepicker.css"
	rel="stylesheet" type="text/css">

<!-- select2控件样式 -->
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/select2/select2.css"
	rel="stylesheet" type="text/css">

<!-- layer web弹层组件样式 -->
<link
	href="${request.getContextPath()}/Public/js/layer/skin/layer.css"
	rel="stylesheet" type="text/css">
	
<!-- pandora-dialog 弹层组件样式 -->
<link
	href="${request.getContextPath()}/Public/js/pandora/css/dialog.css"
	rel="stylesheet" type="text/css">
<script>
	BASE_URL = '${request.getContextPath()}'
</script>
<style type="text/css">
.nav>li>a {
	text-shadow: none;
	color: red;
	font-size: 22px;
}

.datepicker {
	font-size: 16px;
}

.datepicker td, .datepicker th {
	width: 14.28571428571429%;
	height: 40px;
}

.table-condensed {
	width: 100%;
}

.datepicker-inline {
	width: 100%;
}

.col-md-4, .col-md-6, .col-md-7, .col-md-12 {
	padding-right: 0px;
	padding-left: 0px;
}

.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th,
	.table>thead>tr>td, .table>thead>tr>th {
	border-bottom: 1px solid #ddd;
}

.input-inline {
	display: inline-block;
	width: 200px;
	vertical-align: middle;
}

.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover
	{
	color: #EF0E0E;
	cursor: default;
	background-color: #fff;
	border: 1px solid #ddd;
	border-bottom-color: transparent;
}

.nav>li>a {
	text-shadow: none;
	color: rgb(45, 41, 41);
	font-size: 15px;
}

.dialog-confirm {
    padding: 20px;
    font-size: 25px;
    text-align: center;
    color: rgb(253, 8, 8);
}
.dialog-footer {
    text-align: center;
}

.dialog-body .dialog-content {
	padding: 20px;
    width: 100%;
    height: 100%;
    text-align: center;
    color: rgb(253, 8, 8);
    font-size: 25px;
}
</style>

</head>
<body class="page-header-top-fixed page-footer-fixed">
	<!--头部信息结束 -->
	<div class="page-header">
		<!--头部开始-->
		<#include "/include/top.html" />
		<!-- 头部信息结束 -->
	</div>

	<!-- BEGIN PAGE CONTAINER -->
	<div class="page-container">
		<#include "/include/menu.html" />
		<div class="page-content-wrapper">
			<div class="page-content">
				<div class="container-fluid">
					<div class="row">
						<div class="col-md-12" style="height: 75px;">
							<div class="portlet light">
								<form action="${request.getContextPath()}/accountAudit/accountList.do" method="post" id="timeFrom">
									<div class="portlet-body ">
										<!-- tab页签 -->
										<input id="auditStatus" name="auditStatus" type="hidden" value="${auditStatus}">
										<div style="float: left;" class="col-md-7">
											<div class="btn-group btn-group-justified" > 
												<a href="#"   auditStatus="9" onclick="changeTab(this)" <#if auditStatus == 9>class="btn red" <#else> class="btn btn-default"</#if> > 全部 </a>
												<a href="#"   auditStatus="0" onclick="changeTab(this)" <#if auditStatus == 0>class="btn red" <#else>class="btn btn-default"</#if> > 待验证 </a>
												<a href="#"   auditStatus="3" onclick="changeTab(this)" <#if auditStatus == 3>class="btn red" <#else>class="btn btn-default"</#if> > 已划款 </a>
												<a href="#"   auditStatus="1" onclick="changeTab(this)" <#if auditStatus == 1>class="btn red" <#else>class="btn btn-default"</#if> > 已验证</a>
												<a href="#"   auditStatus="2" onclick="changeTab(this)" <#if auditStatus == 2>class="btn red" <#else>class="btn btn-default"</#if> > 已关闭 </a>
											</div>
										</div>
										<div style="float: right;" class="col-md-5">
											<label>申请验证时间:
												<input type="search" class="form-control input-small2 input-inline " placeholder="开始时间" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" onchange="queryDataByTime();" name="startTime" id="startTime" value="${startTime!''}" readonly="readonly">
											</label> - 
											<label>
												<input type="search" class="form-control input-small2 input-inline " placeholder="结束时间" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" onchange="queryDataByTime();" name="endTime" id="endTime" value="${endTime!''}" readonly="readonly">
											</label>
										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-md-12">
							<div class="portlet light " style="margin-top: 5px;">
								<div class="portlet-body">
									<div class="row"
										style="height: 56px; text-align: left; padding-left: 3px;">
										<div class="col-sm-12">
											<div id="sample_2_filter" class="dataTables_filter">
												<form
													action="${request.getContextPath()}/accountAudit/accountList.do"
													method="post" id="myForm">
													
													<label>邮箱/用户名:<input type="search"
														class="form-control input-small2  input-inline"
														placeholder="邮箱/用户名" name="userNames" id="userNames"
														value="${userNames!''}"> 
													</label>
													
													<label>企业名称:<input
															type="search"
															class="form-control input-small2  input-inline"
															placeholder="企业名称" name="companyName" id="companyName"
															value="${companyName!''}">
													</label> 
													
													<label>手机号码:<input type="search"
															class="form-control input-small2  input-inline"
															placeholder="手机号码" name="mobilePhone" id="mobilePhone"
															value="${mobilePhone!''}">
													</label> 
													
													<label>银行账号:<input type="search"
															class="form-control input-small2 input-inline"
															placeholder="银行账号" name="bankAccountNo" id="bankAccountNo"
															value="${bankAccountNo!''}">
													</label>
													
													<input id="auditStatus" name="auditStatus" type="hidden" value="${auditStatus}">

														<button class="btn red" type="submit">
															<i class="fa fa-search"></i> 查询
														</button>
														<!-- <button type="button" id="new_btn" class="btn btn-success">划款测试</button> -->
												</form>
											</div>
										</div>
									</div>
									<div class="table-scrollable">
									<table class="table table-striped table-bordered table-hover">
										<thead>
											<tr>
												<th>用户ID</th>
												<th>申请验证时间</th>
												<th>通过验证时间</th>
												<th>邮箱</th>
												<th>企业名称</th>
												<th>开户银行/账号</th>
												<th>划款金额</th>
												<th>状态</th>
												<th>操作</th>
											</tr>
										</thead>
										<tbody>
											<#if accountList ??>
												<#list accountList as userAccount>
													<tr>
														<td>${userAccount.userId!'--'}</td>
														<td>
															${userAccount.createTime!'--'}
														</td>
														<td>
															${userAccount.bindTime!'--'}
														</td>
														<td>${userAccount.userName!'--'}</td>
														<td><a href="#" id="new_btn" class="chakan" href="javascript:void(0);" userId="${userAccount.userId!}" >${userAccount.companyName!'--'}</a></td>
														<td align="center">
															${userAccount.bankName!'--'}<br>
															${userAccount.bankAccountNo!'--'}
														</td>
														<td>￥
															<#if userAccount.drawMoney ??>
																${userAccount.drawMoney?string(',###.##')}
															<#else>
																--
															</#if>
														</td>
														<td>
															<#if userAccount.auditBankStatus == 0>待验证</#if>
															<#if userAccount.auditBankStatus == 1>已验证</#if>
															<#if userAccount.auditBankStatus == 2>已关闭</#if>
															<#if userAccount.isPayment == 1 >已划款</#if>
														</td>
														<td>
															<#if userAccount.auditBankStatus == 0 && userAccount.isPayment == 0>
																<a href="#" id="new_btn" class="huakuan" href="javascript:void(0);" bindId="${userAccount.bindId!}" drawMoney="${userAccount.drawMoney!''}" bankAccountNo="${userAccount.bankAccountNo!''}"  companyName="${userAccount.companyName!''}">划款</a> 
																| <a href="#" class="tongguo" href="javascript:void(0);" bindId="${userAccount.bindId!}"  drawMoney="${userAccount.drawMoney!''}" bankAccountNo="${userAccount.bankAccountNo!''}" companyName="${userAccount.companyName!''}">通过</a> 
																| <a href="#" class="guanbi" href="javascript:void(0);" bindId="${userAccount.bindId!}"  drawMoney="${userAccount.drawMoney!''}" bankAccountNo="${userAccount.bankAccountNo!''}" userId="${userAccount.userId}" companyName="${userAccount.companyName!''}">关闭</a>
															<#elseif userAccount.auditBankStatus == 0 && userAccount.isPayment == 1>
																已划款 
																| <a href="#" class="tongguo" href="javascript:void(0);" bindId="${userAccount.bindId!}"  drawMoney="${userAccount.drawMoney!''}" bankAccountNo="${userAccount.bankAccountNo!''}" companyName="${userAccount.companyName!''}">通过</a> 
																| <a href="#" class="guanbi" href="javascript:void(0);" bindId="${userAccount.bindId!}"  drawMoney="${userAccount.drawMoney!''}" bankAccountNo="${userAccount.bankAccountNo!''}" userId="${userAccount.userId}" companyName="${userAccount.companyName!''}">关闭</a>
															<#elseif userAccount.auditBankStatus == 1>
																<a href="#" class="chexiao" href="javascript:void(0);" bindId="${userAccount.bindId!}"  drawMoney="${userAccount.drawMoney!''}" bankAccountNo="${userAccount.bankAccountNo!''}" companyName="${userAccount.companyName!''}">撤销</a>
																|<a href="#" class="guanbi" href="javascript:void(0);" bindId="${userAccount.bindId!}"  drawMoney="${userAccount.drawMoney!''}" bankAccountNo="${userAccount.bankAccountNo!''}" userId="${userAccount.userId}" companyName="${userAccount.companyName!''}">关闭</a> 
															<#else>
																--
															</#if>
															
														</td>
													</tr>
												
												</#list>
											</#if>
										</tbody>
									</table>
									</div>
									<div style="width: 80%; margin: 0 auto;">
										<div id="kkpager">
											<input type="hidden" value="${totalPage!''}" id="totalPage">
											<input type="hidden" value="${totalRecords!''}" id="totalRecords">
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- END PAGE CONTAINER -->
	<!-- 底部开始 -->
	<#include "/include/foot.html" />
	<!-- 底部结束 -->
	<div class="modal fade">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">×</button>
					<h4 class="modal-title">Modal title</h4>
				</div>
				<div class="modal-body">
					<p>One fine body…</p>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
					<button type="button" class="btn btn-primary">Save changes</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
	<!-- /.modal -->
</body>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery-migrate.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery-ui/jquery-ui.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/js/bootstrap.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery.blockui.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery.cokie.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/uniform/jquery.uniform.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery-notific8/jquery.notific8.min.js"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery.sparkline.min.js"
	type="text/javascript"></script>

<!-- <script
	src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker-index.js"
	type="text/javascript"></script> -->
<!-- 时间插件 -->
<script
	src="${request.getContextPath()}/Public/js/jqueryUI/jquery.ui.custom.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/js/jqueryUI/jquery.ui.datepicker.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/js/jqueryUI/jquery.ui.datepicker-zh-CN.js"
	type="text/javascript"></script>
	

<script
	src="${request.getContextPath()}/Public/assets/global/scripts/metronic.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/admin/scripts/layout.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/admin/scripts/commonUtils.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/highcharts.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/kkpager.min.js"
	type="text/javascript"></script>
<script type="text/javascript"
	src="${request.getContextPath()}/Public/My97DatePicker/WdatePicker.js"></script>
<script src="${request.getContextPath()}/Public/js/moment/moment.js"
	type="text/javascript"></script>


<!-- select2控件 -->
<script type="text/javascript"
	src="${request.getContextPath()}/Public/assets/global/plugins/select2/select2.js"></script>
<script type="text/javascript"
	src="${request.getContextPath()}/Public/assets/global/plugins/select2/select2_locale_zh-CN.js"></script>

<!-- layer web弹层组件-->
<script type="text/javascript"
	src="${request.getContextPath()}/Public/js/layer/layer.min.js"></script>
	
<!-- pandora-dialog 弹层组件 -->
<script type="text/javascript"
	src="${request.getContextPath()}/Public/js/pandora/pandora-dialog.js"></script>
	
<!-- 脚本代码 -->
<script type="text/javascript">
	$(function() {
		Metronic.init(); // init metronic core componets
		Layout.init(); // init layout

		
		//搜索下拉框
		//toSelect2();

		//初始化分页插件	
		toPage();
	});

	//分页
	function toPage() {
		function getParameter(name) {
			var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
			var r = window.location.search.substr(1).match(reg);
			if (r != null)
				return unescape(r[2]);
			return null;
		}

		var totalPage = $('#totalPage').val();
		var totalRecords = $('#totalRecords').val();

		var pageNo = getParameter('pno');
		if (!pageNo) {
			pageNo = 1;
		}

		//生成分页
		//有些参数是可选的，比如lang，若不传有默认值
		kkpager.generPageHtml({
			pno : pageNo,
			//总页码
			total : totalPage,
			//总数据条数
			totalRecords : totalRecords,
			
			getLink : function(n) {
				//alert($("#userName").val());
				return this.hrefFormer + this.hrefLatter + "?pno=" + n
						+ "&userNames=" + $("#userNames").val() + "&companyName="
						+encodeURI(encodeURI($("#companyName").val())) + "&mobilePhone="
						+ $("#mobilePhone").val() + "&bankAccountNo="
						+ $("#bankAccountNo").val() + "&auditStatus="
						+ $("#auditStatus").val();
			}
		});
	}
	//确认划款
	$("a.huakuan").bind("click", function() {
		var drawMoney = $(this).attr("drawMoney");//划款数额
		var bankAccountNo = $(this).attr("bankAccountNo");//绑定的银行卡号
		var bindId = $(this).attr("bindId");//绑定的银行卡主键 
		payment(drawMoney,bankAccountNo,bindId);
	});
	//确认划款
	function payment(param1,param2,param3) {
	 	$.confirm("是否已确认划款"+param1+"元?", function () {
	    	var resultCode; 
			$.ajax({
				url : "${request.getContextPath()}/accountAudit/transferMoney.do",
				type : "post",
				dataType:'JSON',
				data:{"drawMoney":param1,"bankAccountNo":param2,"bindId":param3},
				success : function(result) {
					 confirmAndRefresh(result);
				}
			});
   		});
		   return false;		
	}
	
	//审核通过
	$("a.tongguo").bind("click", function() {
		var drawMoney = $(this).attr("drawMoney");//划款数额
		var bankAccountNo = $(this).attr("bankAccountNo");//绑定的银行卡号
		var bindId = $(this).attr("bindId");//绑定的银行卡主键 
		var companyName=$(this).attr("companyName");//企业名称
		auditPass(drawMoney,bankAccountNo,bindId,companyName);
	});
	
	
	function auditPass(param1,param2,param3,companyName){
		$.confirm("确认审核通过吗?", function () {
			$.ajax({
				url : "${request.getContextPath()}/accountAudit/auditPass.do",
				type : "post",
				dataType:'JSON',
				data:{"drawMoney":param1,"bankAccountNo":param2,"bindId":param3,"companyName":companyName},
				success : function(result) {
					 confirmAndRefresh(result);
				}
			});
   		});
		   return false;	
	}
	
	//撤销绑定
	$("a.chexiao").bind("click", function() {
		var bankAccountNo = $(this).attr("bankAccountNo");//绑定的银行卡号
		var bindId = $(this).attr("bindId");//绑定的银行卡主键 
		cancelBind(bankAccountNo,bindId);
	});
	function cancelBind(param,bindId){
		$.confirm("确认撤销吗?", function () {
			$.ajax({
				url : "${request.getContextPath()}/accountAudit/cancelBind.do",
				type : "post",
				dataType:'JSON',
				data:{"bankAccountNo":param,"bindId":bindId},
				success : function(result) {
					 confirmAndRefresh(result);
				}
			});
   		});
		   return false;	
	}
	
	//关闭
	$("a.guanbi").bind("click", function() {
		var drawMoney = $(this).attr("drawMoney");//划款数额
		var bankAccountNo = $(this).attr("bankAccountNo");//绑定的银行卡号
		var bindId = $(this).attr("bindId");//绑定的银行卡主键 
		var companyName=$(this).attr("companyName");//企业名称
		var userId=$(this).attr("userId");//企业名称
		closeBind(drawMoney,bankAccountNo,bindId,companyName,userId);
	});
	
	function closeBind(param1,param2,param3,companyName,userId){
		$.confirm("确认关闭吗?", function () {
			$.ajax({
				url : "${request.getContextPath()}/accountAudit/closeBind.do",
				type : "post",
				dataType:'JSON',
				data:{"drawMoney":param1,"bankAccountNo":param2,"bindId":param3,"companyName":companyName,"userId":userId},
				success : function(result) {
					 confirmAndRefresh(result);
				}
			});
   		});
		   return false;	
	}
	
	////页签切换 tab
	function changeTab(Object){
		var auditStatus = $(Object).attr("auditStatus");
		$("#auditStatus").val(auditStatus);
		$("#timeFrom").submit();
	}
	
	
	function confirmAndRefresh(result){
		if (result.code == "success") {
			pandora.dialog({wrapClass: "dialog-mini", content:result.message, okValue:"确定",ok:function(){
			//重新加载
			//window.location.reload();
			window.location.href = "${request.getContextPath()}/accountAudit/accountList.do";
			}});
		}else {
			pandora.dialog({wrapClass: "dialog-mini", content:result.message, okValue:"确定",ok:function(){
				//$.alert(result.message);
				//重新加载
				window.location.href = "${request.getContextPath()}/accountAudit/accountList.do";
			}});
		}
	}
	

	//查看公司信息
	$("a.chakan").bind("click", function() {
		var userId =  $(this).attr("userId");
		var url = "${request.getContextPath()}/accountAudit/showCompany.do?userId="+userId;
		CommonUtils.editModal(url, '600');
		
	});
	
	/* $("#startTime").datepicker({
		changeYear: true,
		changeMonth: true,
		yearRange:"2015:2050",
		prevText: '<',
		nextText: '>',
		onSelect:function(dateText,inst){
			var endText=AddDays(dateText);
			$("#endTime").datepicker("option","minDate",dateText);
			$("#endTime").datepicker("option","maxDate",endText);
			$(this).focus();
			$(this).blur();
			var dateStart = $("#startTime").val();
			var dateEnd = $("#endTime").val();
			//比较起始日期大小 
			var a = dateCompare(dateStart,dateEnd);
			if( a == 1 || a == 2){
				queryDataByTime();
			}
		}
	});
	
	$("#endTime").datepicker({
		changeYear: true,
		changeMonth: true,
		yearRange:"2015:2050",
		prevText: '<',
		nextText: '>',
		beforeShow: function() {
			var query=$("#startTime").val();
			var dateText=AddDays(query);
			$("#endTime").datepicker("option","maxDate",dateText);
		},
		onSelect:function(dateText,inst){
			$("#startTime").datepicker("option","maxDate",dateText);
			$(this).focus();
			$(this).blur();
			queryDataByTime();
		}
	}); */
	
	//注册时间查询数据
	function queryDataByTime(){
		$("#timeFrom").submit();
	}
	
	
	function AddDays(date){
		var nd = new Date(date);
		nd.setDate(nd.getDate()+3650);//最长间隔多少天  本处最大间隔设置为十年 
		var y = nd.getFullYear();
		var m = nd.getMonth()+1;
		var d = nd.getDate();
		if(m <= 9) m = "0"+m;
		if(d <= 9) d = "0"+d; 
		var cdate = y+"-"+m+"-"+d;//选定时间后，呈现的格式
		return cdate;
	}
	
	//js比较日期大小 
	function dateCompare(date1,date2){
		date1 = date1.replace(/\-/gi,"/");
		date2 = date2.replace(/\-/gi,"/");
		var time1 = new Date(date1).getTime();
		var time2 = new Date(date2).getTime();
		if(time1 > time2){
			return 1;
		}else if(time1 == time2){
			return 2;
		}else{
			return 3;
		}
	}
	
</script>
</html>